//
//  UILabel+Until.m
//  Healthy
//
//  Created by 聂志康 on 2018/6/19.
//  Copyright © 2018年 weipainetwork. All rights reserved.
//

#import "UILabel+Until.h"

@implementation UILabel (Until)
- (instancetype)initWithFrame:(CGRect)frame andText:(NSString *)text andTextColor:(UIColor *)color andFont:(UIFont *)font andTextAlignment:(NSTextAlignment)textAlignment {
    UILabel *label = [[UILabel alloc] initWithFrame:frame];
    if (color) {
        label.textColor = color;
    } else {
        label.textColor = [UIColor blackColor];
    }
    if (text) {
        label.text = text;
    } else {
        label.text = @"";
    }
    if (font) {
        label.font = font;
    } else {
        label.font = [UIFont systemFontOfSize:16];
    }
    if (textAlignment) {
        label.textAlignment = textAlignment;
    } else {
        label.textAlignment = NSTextAlignmentLeft;
    }
    return label;
}
@end
